package com.nnnu.wsnackshop;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@SpringBootApplication
@Slf4j
@EnableTransactionManagement
@EnableCaching // 开启缓存注解功能
@EnableAspectJAutoProxy(exposeProxy = true)
@MapperScan("com.nnnu.wsnackshop.mapper")
@EnableRetry
@EnableAsync
@EnableScheduling // 启用定时任务
public class WSnackShopApplication {

    public static void main(String[] args) {
        SpringApplication.run(WSnackShopApplication.class, args);
        log.info("server start.....");
    }
}
